<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      /* div {
        width: 500px;
        height: 300px;
        background: red;
        margin-left: 40%;
      } */
      /* div {
        width: 100%;
        background: burlywood;
        border: 1px solid #000;
        display: inline-block;
        margin-top: 10%;
        margin-left: 10%;
      } */
    </style>
  </head>
  <body>
    <!-- <div id="n">
      <div id="id1">我是div1</div>
    </div> -->

    <button>dianji</button>
    <!-- <a href="#id1">id1</a>
    <a href="#id2">id2</a>
    <a href="#id3">id3</a>
    <a href="#id4">id4</a>
    <a href="#id5">id5</a>

    <div id="id2">我是div2</div>
    <div id="id3">我是div3</div>
    <div id="id4">我是div4</div>
    <div id="id5">我是div5</div> -->
  </body>
  <script>
    // window.open('http://www.baidu.com')
    // console.log(window.innerHeight)
    // console.log(window.innerWidth)
    // console.log(window.location.hash)
    document
      .getElementsByTagName('button')[0]
      .addEventListener('click', function () {
        // console.log(location.href)
        // window.history.back()
        // window.history.go(2) //刷新
        // location.href = 'http://www.baidu.com'
        // console.log(window.screen.width)
        // console.log(window.screen.availWidth)
      })
  </script>
</html>
